package com.glsc.ngateway.common.base.domain.mysql.gateway.platform.flow;

import com.glsc.ngateway.common.base.domain.mysql.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author xuchang
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@Entity
@Where(clause = "deleted = 0")
@SQLDelete(sql = "update t_gw_flow_form_equipment_modify_virtual_device_detail set deleted = UNIX_TIMESTAMP(NOW()) where id=?")
@SQLDeleteAll(sql = "update t_gw_flow_form_equipment_modify_virtual_device_detail set deleted = UNIX_TIMESTAMP(NOW()) where id=?")
@Table(name = "t_gw_flow_form_equipment_modify_virtual_device_detail")
@org.hibernate.annotations.Table(appliesTo = "t_gw_flow_form_equipment_modify_virtual_device_detail", comment = "设备变更流程form表单-虚拟机子表")
public class FlowFormEquipmentModifyVirtualDeviceDetail extends BaseEntity {

    private static final long serialVersionUID = 9201571369485688812L;

    @Column(name = "equipment_modify_id", columnDefinition = "bigint not null comment '主表ID'")
    private Long equipmentModifyId;

    @Column(name = "dev_id", columnDefinition = "varchar(64) not null comment '设备Id'")
    private String devId;

    @Column(name = "business_name", columnDefinition = "varchar(64) comment '业务系统'")
    private String businessName;

    @Column(name = "application_detail", columnDefinition = "varchar(64) comment '应用明细'")
    private String applicationDetail;

    @Column(name = "machine_area", columnDefinition = "int comment '环境'")
    private String machineArea;

    @Column(name = "virtual_name", columnDefinition = "varchar(64) comment '虚拟机名称'")
    private String virtualName;

    @Column(name = "operation_sys", columnDefinition = "int comment '操作系统'")
    private String operationSys;

    @Column(name = "vcent_ip", columnDefinition = "varchar(64) comment 'VcentIp'")
    private String vcentIp;

    @Column(name = "virtual_ip", columnDefinition = "int not null comment '虚拟主机Ip,关联服务器Ip1'")
    private Integer virtualIp;

    @Column(name = "qj", columnDefinition = "int comment '群集'")
    private String qj;

    @Column(name = "cpu", columnDefinition = "int comment 'CPU'")
    private String cpu;

    @Column(name = "memory", columnDefinition = "int comment 'memory'")
    private String memory;

    @Column(name = "user_id", columnDefinition = "varchar(64) comment '责任人'")
    private String userId;

    @Column(name = "bz", columnDefinition = "varchar(4096) comment '备注'")
    private String bz;

    @Column(name = "ip_list", columnDefinition = "varchar(256) comment 'IpList'")
    private String ipListStr;

    @Column(name = "mac1", columnDefinition = "varchar(64) comment 'mac1'")
    private String mac1;

    @Column(name = "mac2", columnDefinition = "varchar(64) comment 'mac2'")
    private String mac2;

    @Column(name = "bf", columnDefinition = "varchar(64) comment '备份情况说明'")
    private String bf;

    @Column(name = "network_segment", columnDefinition = "int comment '业务网段'")
    private String networkSegment;

    @Column(name = "mark", columnDefinition = "varchar(64) comment '删除标记:1.默认,2.删除'")
    private String mark;

    /**
     * 修改后
     */
    @Column(name = "business_name_modified", columnDefinition = "varchar(64) comment '业务系统(修改后)'")
    private String businessNameModified;

    @Column(name = "application_detail_modified", columnDefinition = "varchar(64) comment '应用明细(修改后)'")
    private String applicationDetailModified;

    @Column(name = "machine_area_modified", columnDefinition = "int comment '环境(修改后)'")
    private String machineAreaModified;

    @Column(name = "virtual_name_modified", columnDefinition = "varchar(64) comment '虚拟机名称(修改后)'")
    private String virtualNameModified;

    @Column(name = "operation_sys_modified", columnDefinition = "int comment '操作系统(修改后)'")
    private String operationSysModified;

    @Column(name = "vcent_ip_modified", columnDefinition = "varchar(64) comment 'VcentIp(修改后)'")
    private String vcentIpModified;

    @Column(name = "virtual_ip_modified", columnDefinition = "int comment '虚拟主机Ip,关联服务器Ip1(修改后)'")
    private Integer virtualIpModified;

    @Column(name = "qj_modified", columnDefinition = "int comment '群集(修改后)'")
    private String qjModified;

    @Column(name = "cpu_modified", columnDefinition = "int comment 'CPU(修改后)'")
    private String cpuModified;

    @Column(name = "memory_modified", columnDefinition = "int comment '内存(修改后)'")
    private String memoryModified;

    @Column(name = "user_id_modified", columnDefinition = "varchar(64) comment '责任人(修改后)'")
    private String userIdModified;

    @Column(name = "bz_modified", columnDefinition = "varchar(4096) comment '备注(修改后)'")
    private String bzModified;

    @Column(name = "ip_list_modified", columnDefinition = "varchar(256) comment 'IpList(修改后)'")
    private String ipListModifiedStr;

    @Column(name = "mac1_modified", columnDefinition = "varchar(64) comment 'mac1(修改后)'")
    private String mac1Modified;

    @Column(name = "mac2_modified", columnDefinition = "varchar(64) comment 'mac2(修改后)'")
    private String mac2Modified;

    @Column(name = "bf_modified", columnDefinition = "varchar(64) comment '备份情况说明(修改后)'")
    private String bfModified;

    @Column(name = "network_segment_modified", columnDefinition = "int comment '业务网段(修改后)'")
    private String networkSegmentModified;

    @Column(name = "mark_modified", columnDefinition = "varchar(64) comment '删除标记:1.默认,2.删除(修改后)'")
    private String markModified;

}
